package com.yequan.set;

import com.yequan.work.JsonMapper;

import java.util.HashSet;
import java.util.Set;

/**
 * @author yq
 * @date 2020/10/10
 */
public class HashSetDemo {

    public static void main(String[] args) {
        Set<Integer> set = new HashSet<>();
        set.add(1);
        set.add(3);
        System.out.println(JsonMapper.toJson(set));

        Set<String> set2 = new HashSet<>();
        set2.add("hello");
        set2.add("world");
        System.out.println(JsonMapper.toJson(set2));
    }

}
